package com.vf.admin.fiwork.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.AppCashWithdrawal;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * 提现
 */
@Repository
public class CashWithdrawalDao extends BaseDao<AppCashWithdrawal> {


   public  AppCashWithdrawal getByCustOrderNo(String custOrderNo) {
        StringBuilder str = new StringBuilder();
        List list = new ArrayList();
        str.append("select * from app_cashwithdrawal  where custOrderNo= ?");
        list.add(custOrderNo);
        String sql = str.toString();
        return this.queryObj(sql, list, AppCashWithdrawal.class);
    }


    public List<AppCashWithdrawal> getWithdrawListByUserId(Integer userId,SplitPageBean splitPageBean) {

        List list = new ArrayList();
        StringBuilder sbStr = new StringBuilder();
        sbStr.append("select *  from app_cashwithdrawal where userid =? ");
        list.add(userId);
        String sql = sbStr.toString();
        return this.queryList(sql, list, AppCashWithdrawal.class, splitPageBean);
    }




}
